<!-- File: /app/View/Posts/edit.ctp -->
<?php
$options=array();
foreach($menus as $menu){
	$id=$menu['menus']['id'];
	$name=$menu['menus']['title'];
	$options[$id]=$name;
}
?>
<?php
	include("../../app/View/Parts/left.ctp");
?>
<div class="span9 page form">
	<fieldset>
		<legend>Create Artical</legend>
		<?php
			echo $this->Form->create('Page');
		?>
		<div class="span11 well">
			<div class="span6">
			<h3>Options</h3>
			<?php
			echo $this->Form->input('default_page',array('type'=>'checkbox', 'class'=>'checkbox'));
			echo "<br>";
			echo $this->Form->input('display_slide',array('type'=>'checkbox', 'class'=>'checkbox'));
			echo "<br>";
			echo $this->Form->input('contact_form',array('type'=>'checkbox', 'class'=>'checkbox'));
			?>
			</div>
			<div class="span5">
				<p>
					Select options as your page required.
				</p>
			</div>
				
		</div>
		
		<div class="span11 well">
			<h3>Basic of page</h3>
		<?php
			echo "<br>";
			echo $this->Form->input('title',array('class'=>'span8'));
			echo "<br>";
			echo $this->Form->input('menu_id',array(
					'options'=>$options,
					'class'=>'span8'
				));
			
			echo "<br>";
		
			echo $this->Form->input('page', array('type' => 'textarea', 'id'=>'ckeditor', 'label' => false));
		?>
		<script>
			CKEDITOR.replace( 'ckeditor',
				{
					filebrowserBrowseUrl : '<?php echo $base_url; ?>/app/webroot/js/ckfinder/ckfinder.html'
				}
			);
		</script>
		<?php
			echo "<br>";
			$options = array(
				'label' => 'Save',
				'class'=>'btn',
			);
			echo $this->Form->end($options);
		?>
		</div>
		<div style="width:100%; height:10px;">&nbsp;</div>
	</fieldset>
</div>
<div style="clear:both;"></div>